import { post, get } from '@/utils/request'

const login = params => post('/user/login', params)
const updateStudent = params => post('/user/student/update', params)
const getStudent = (id) => get(`/user/student/${id}`)
const updateTeacher = params => post('/user/teacher/update', params)
const getTeacher = (id) => get(`/user/teacher/${id}`)
const listConsult = () => get('/user/all/optional')

export {
  login,
  updateStudent,
  getStudent,
  listConsult,
  updateTeacher,
  getTeacher,
}
